/******************************************************************************
*
* This file is part of FreeTrack (http://code.google.com/p/qtfreetrack).
* BY Willy Gardiol (willy@gardiol.org)
*
* FreeTrack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FreeTrack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar.  If not, see <http://www.gnu.org/licenses/>
*
******************************************************************************/
#ifndef FREETRACK_H
#define FREETRACK_H

#include "IncFreeTrack.h"
#include "configwidget.h"

class LayerManager;
class TrackTable;
class TrackGps;
class ConfigWidget;
class MainSelector;
class StatusBar;

class FreeTrack : public QMainWindow
{
    Q_OBJECT
public:
    explicit FreeTrack(QWidget *parent );
    ~FreeTrack();

    void resizeEvent(QResizeEvent *);

private:
    // The widget to hold the central widgets
    QStackedWidget * center;

    // Central Widgets
    LayerManager * layers;
    TrackTable   * table;
    TrackGps     * gps;
    MainSelector * selector;
    StatusBar    * statusBar;

    // Keep track of the last displayed widget
    QWidget* last_displayed;

    // The config widget (will be put inside a Dialog box when needed to display)
    ConfigWidget config;

public slots:
    // Hide freetrack
    void hideMe();
    // quit
    void askQuit();
    // show modal dialogs
    void showAbout();
    void showConfig();

private slots:
    void screenRotated(int);

public slots:
    // Show widgets
    void showLayers();
    void showTable();
    void showGps();
    void showSelector(bool);

};

#endif // FREETRACK_H
